package com.luo.locationapp.activity;

import com.luo.locationapp.R;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.animation.AnimationSet;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

public class RegisterActivity extends Activity implements OnClickListener{
	private TextView title;
	private LinearLayout container;
	private Button btCancel, btConfirm;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().requestFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_register);
		
		findView();
		
		init();
		
	}
	
	@Override
	protected void onStart() {
		super.onStart();
		AnimationSet animationSet = new AnimationSet(true);
		animationSet.addAnimation(AnimationUtils.loadAnimation(RegisterActivity.this, R.anim.translatedown));
		animationSet.addAnimation(AnimationUtils.loadAnimation(RegisterActivity.this, R.anim.alpha));
		container.setVisibility(View.VISIBLE);
		container.startAnimation(animationSet);
	}
	private void findView(){
		title = (TextView) findViewById(R.id.generalbar_tips);
		container = (LinearLayout) findViewById(R.id.register_ll_container);
		btCancel = (Button) findViewById(R.id.register_bt_cancel);
		btConfirm = (Button) findViewById(R.id.register_bt_commit);
	}
	
	private void init() {
		title.setText(R.string.register);
	}

	@Override
	public void onClick(View arg0) {
		switch(arg0.getId()){
		case R.id.register_bt_cancel:
			finish();
			break;
		case R.id.register_bt_commit:
			
			break;
		default:
			break;
		}
	}
}
